Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / feature / intro / src / androidMain / kotlin / org / meshtastic / feature / intro / AppIntroductionScreen.kt

Displaying Raw • Download

feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/AppIntroductionScreen.kt b8ab53e712871d076effd2defc55be720495aba5 (b8ab53e7) Text, 3.14 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.intro

Tff7b72import T7ee787android.os.Build
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.runtime.CompositionLocalProvider
Tff7b72import T7ee787androidx.compose.runtime.remember
Tff7b72import T7ee787androidx.compose.ui.platform.LocalContext
Tff7b72import T7ee787androidx.navigation3.runtime.entryProvider
Tff7b72import T7ee787androidx.navigation3.runtime.rememberNavBackStack
Tff7b72import T7ee787org.meshtastic.core.ui.component.MeshtasticNavDisplay
Tff7b72import T7ee787org.meshtastic.core.ui.util.rememberBluetoothPermissionState
Tff7b72import T7ee787org.meshtastic.core.ui.util.rememberLocationPermissionState
Tff7b72import T7ee787org.meshtastic.core.ui.util.rememberNotificationPermissionState

T8b949e/**
* Main application introduction screen. This Composable hosts the navigation flow and hoists the permission states.
*
* @param onDone Callback invoked when the introduction flow is completed.
* @param viewModel ViewModel for tracking the introduction flow state.
*/
Tf0883e@Composable
Tff7b72fun Td2a8ffAppIntroductionScreenTb4b4b4(Te6edf3onDoneTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4, Te6edf3viewModelTb4b4b4: Te6edf3IntroViewModelTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3context Tff7b72= Te6edf3LocalContextTb4b4b4.Te6edf3current

T8b949e// Pre-Android 13 has no runtime notification permission, so there is nothing to configure — keep it null so the
T8b949e// intro flow can skip the notification screen entirely. SDK_INT is constant per process, so the conditional call
T8b949e// is recomposition-safe.
Tff7b72val Te6edf3notificationPermissionState Tff7b72=
Tff7b72if Tb4b4b4(Te6edf3BuildTb4b4b4.Te6edf3VERSIONTb4b4b4.Te6edf3SDK_INT Tff7b72>Tff7b72= Te6edf3BuildTb4b4b4.Te6edf3VERSION_CODESTb4b4b4.Te6edf3TIRAMISUTb4b4b4) Te6edf3rememberNotificationPermissionStateTb4b4b4(Tb4b4b4) Tff7b72else Tff7b72null

Tff7b72val Te6edf3locationPermissionState Tff7b72= Te6edf3rememberLocationPermissionStateTb4b4b4(Tb4b4b4)
Tff7b72val Te6edf3bluetoothPermissionState Tff7b72= Te6edf3rememberBluetoothPermissionStateTb4b4b4(Tb4b4b4)

Tff7b72val Te6edf3permissions Tff7b72=
Te6edf3rememberTb4b4b4(Te6edf3notificationPermissionStateTb4b4b4, Te6edf3locationPermissionStateTb4b4b4, Te6edf3bluetoothPermissionStateTb4b4b4) Tb4b4b4{
Te6edf3AndroidIntroPermissionsTb4b4b4(
Te6edf3bluetoothState Tff7b72= Te6edf3bluetoothPermissionStateTb4b4b4,
Te6edf3locationState Tff7b72= Te6edf3locationPermissionStateTb4b4b4,
Te6edf3notificationState Tff7b72= Te6edf3notificationPermissionStateTb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tff7b72val Te6edf3settingsNavigator Tff7b72= Te6edf3rememberTb4b4b4(Te6edf3contextTb4b4b4) Tb4b4b4{ Te6edf3AndroidIntroSettingsNavigatorTb4b4b4(Te6edf3contextTb4b4b4) Tb4b4b4}
Tff7b72val Te6edf3backStack Tff7b72= Te6edf3rememberNavBackStackTb4b4b4(Te6edf3WelcomeTb4b4b4)

Te6edf3CompositionLocalProviderTb4b4b4(
Te6edf3LocalIntroPermissions Te6edf3provides Te6edf3permissionsTb4b4b4,
Te6edf3LocalIntroSettingsNavigator Te6edf3provides Te6edf3settingsNavigatorTb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3MeshtasticNavDisplayTb4b4b4(
Te6edf3backStack Tff7b72= Te6edf3backStackTb4b4b4,
Te6edf3entryProvider Tff7b72= Te6edf3entryProvider Tb4b4b4{ Te6edf3introGraphTb4b4b4(Te6edf3backStack Tff7b72= Te6edf3backStackTb4b4b4, Te6edf3viewModel Tff7b72= Te6edf3viewModelTb4b4b4, Te6edf3onDone Tff7b72= Te6edf3onDoneTb4b4b4) Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s